<?php
C_base::yn_file('m'.DS.'Model.php');
class pinglunglModel extends model{
/******************************************************************操作方法***********************************************************************/
	//评论表的操作
	function pinglun_ss($zid,$w,$page='',$pagesize=''){
		if($page){
			$rs['data'] = $this->pinglun($zid)->w($w)->p($page,$pagesize)->ss();
			$rs['count'] = $this->pinglun($zid)->w($w)->n();
			return $rs;
		}else{
			return $this->pinglun($zid)->w($w)->ss();
		}
	}
	
	function pinglun_s($zid,$w){
		return $this->pinglun($zid)->w($w)->s();
	}
	
	function pinglun_u($zid,$w,$u){
		return $this->pinglun($zid)->w($w)->u($u);
	}
	
	function pinglun_d($zid,$w){
		return $this->pinglun($zid)->w($w)->d();
	}
	
	function pinglun_c($zid,$c){
		return $this->pinglun($zid)->c($c);
	}
	
	function pinglun_del($zid,$w){
		return $this->pinglun($zid)->w($w)->del_all();
	}
/******************************************************************数据库、表**********************************************************************/
	function pinglun($zid){
		$pinglun = 'pinglun_'.util::end1($zid);//对应语言的表名
		return $this->db_cms()->$pinglun;
	}
}
/*********************************************************************文件已结束*****************************************************************/